package com.pro5.test.pro5demo.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * Created by fangjicai on 2020/1/3.
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "pro5goods",type = "docs",shards = 1,replicas = 0)
public class Pro5Goods implements Serializable {
    @Id
    private Integer id;
    @Field(type = FieldType.keyword)
    private String name;
    @Field(type = FieldType.keyword)
    private String brand;
    @Field(type = FieldType.keyword)//关键字词条，最小的分词单元，不可分词处理
    private String category;
    @Field(type = FieldType.text,analyzer = "ik_max_word")//类型为文本，可分词处理
    private  String all;
    private BigDecimal price;
    private Integer status;

    private Integer store;



}
